package com.qfedu.provider.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 图片
 * @TableName db_dynamic_images
 */
@TableName(value ="db_dynamic_images")
@Data
public class DbDynamicImages implements Serializable {
    /**
     * 图片id
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 动态图文id
     */
    private Integer dynamicsId;

    /**
     * 图片地址
     */
    private String imagesUrl;

    /**
     * 逻辑删除    1存在  0删除
     */
    private Integer deleted;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新时间
     */
    private Date updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    public DbDynamicImages(Integer dynamicsId, String imagesUrl) {
        this.dynamicsId = dynamicsId;
        this.imagesUrl = imagesUrl;
        this.createTime = new Date();
        this.updateTime = new Date();
        this.deleted=1;
    }
}